package com.dldata.devtools30.entity;

import jakarta.persistence.*;

import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "devt_excel_log")
public class DevtExcelLogEntity {
    private String id;
    private String username;
    private String excelId;
    private Timestamp importTime;
    private String fileLength;
    private String datacontent;
    private String contentType;
    private String fileNameOrg;
    private Integer status;
    private Timestamp costdatatime;

    @Id
    @Column(name = "id", nullable = false, length = 64)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "username", nullable = true, length = 256)
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Basic
    @Column(name = "excel_id", nullable = true, length = 64)
    public String getExcelId() {
        return excelId;
    }

    public void setExcelId(String excelId) {
        this.excelId = excelId;
    }

    @Basic
    @Column(name = "import_time", nullable = true)
    public Timestamp getImportTime() {
        return importTime;
    }

    public void setImportTime(Timestamp importTime) {
        this.importTime = importTime;
    }

    @Basic
    @Column(name = "file_length", nullable = true, length = 64)
    public String getFileLength() {
        return fileLength;
    }

    public void setFileLength(String fileLength) {
        this.fileLength = fileLength;
    }

    @Basic
    @Column(name = "datacontent", nullable = true, length = 2147483647)
    public String getDatacontent() {
        return datacontent;
    }

    public void setDatacontent(String datacontent) {
        this.datacontent = datacontent;
    }

    @Basic
    @Column(name = "content_type", nullable = true, length = 64)
    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    @Basic
    @Column(name = "file_name_org", nullable = true, length = 64)
    public String getFileNameOrg() {
        return fileNameOrg;
    }

    public void setFileNameOrg(String fileNameOrg) {
        this.fileNameOrg = fileNameOrg;
    }

    @Basic
    @Column(name = "status", nullable = true)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "costdatatime", nullable = true)
    public Timestamp getCostdatatime() {
        return costdatatime;
    }

    public void setCostdatatime(Timestamp costdatatime) {
        this.costdatatime = costdatatime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DevtExcelLogEntity that = (DevtExcelLogEntity) o;
        return Objects.equals(id, that.id) && Objects.equals(username, that.username) && Objects.equals(excelId, that.excelId) && Objects.equals(importTime, that.importTime) && Objects.equals(fileLength, that.fileLength) && Objects.equals(datacontent, that.datacontent) && Objects.equals(contentType, that.contentType) && Objects.equals(fileNameOrg, that.fileNameOrg) && Objects.equals(status, that.status) && Objects.equals(costdatatime, that.costdatatime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, username, excelId, importTime, fileLength, datacontent, contentType, fileNameOrg, status, costdatatime);
    }
}
